Skip to content

davidBudget Project continuation (separated repo) for Unit, Integration and Functional Tests setup.

License

Notifications You must be signed in to change notification settings

davidlares/budget-webapp-django-testing

Repository files navigation

davidBudgetTesting

This is a continuation of davidBudget repo.

In this opportunity we built the testing module for this Webapp. Unit and Integration testing with the Unittest module (I think it already comes with Django 2.1.x).

And Functional testing with the ChromeDriver software and Selenium for Automated Web Browser Actions

ChromeDriver

"WebDriver is an open source tool for automated testing of webapps across many browsers". Is a B-side software that displays a web browser built by Chromium

Download: ChromeDriver

Selenium

Works along with ChromeDriver (the previous software runs an server browser) or something like that, and the Selenium automates tasks for testing purposes. Please refer to the funtional_tests/test_project_list_page.py file.

Automated testing

Is a piece of code which makes sure that another piece of code is working correctly under a certain condition Code like normally do - validates is the functionality is correctly

Unit Test

This particular test runs (test cycle) one piece independently of other pieces

`def add_number(first, second):
    return first + second

 def test_add_numbers():
    assert add_numbers(1,2) == 3

  If True = doesn't complain
`

Integration Test

Tests for multiple pieces together to assure that they work well with one another

Functional Test

Usually are the tests that works from the end-user's POV

Running Tests

./manage.py test [application] ./manage.py test fuctional_tests This directory should be a Python module

Virtualenv

Make sure that for Django 2.x we need to use Py3 based Virtualenv, so, commonly virtualenv is installed and implemented using the Py2 version. To force it, we need to specify the python version with the -p flag:

virtualenv -p python3 [name]

Installing dependencies

Just run the pip install -r requirements.txt

Security Update

According to the National Vulnerability Database, the bug CVE-2019-6975 is present on the Django 2.1.0 version of it. So, this repo was updated to the 2.1.7 which is a bug free version of it.

You can find more information here: CVE-2019-6975

Credits

License

About

davidBudget Project continuation (separated repo) for Unit, Integration and Functional Tests setup.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published